//引入组件
import index from '@/components/address/index.vue'
import add from '@/components/address/add.vue'
import edit from '@/components/address/edit.vue'

const children = [
    {
        //收货地址列表
        path:'index',
        name:'AddressIndex',
        component:index,
        meta:{
            auth:true
        }
    },
    {
        //收货地址添加
        path:'add',
        name:'AddressAdd',
        component:add,
        meta:{
            auth:true
        }
    },
    {
        //收货地址编辑
        path:'edit',
        name:'AddressEdit',
        component:edit,
        meta:{
            auth:true
        }
    },
]

//1级路由的组件
const layout = {
    template: `<router-view></router-view>`
}

export default {
    name: 'address',
    path: '/address', //1级路由
    component: layout, //组件
    children: children
}